<template>
  <!-- 场地预约 -->
  <div>
    <ExZbidOpeningArrangeList ref="arrangeListRef" :projectId="projectId">
      <template slot="actionList">
        <div class="table-operator">
          <a-button type="primary" @click="showApplyModal" style="margin-left: 8px">场地预约</a-button>
        </div>
      </template>
    </ExZbidOpeningArrangeList>
    <ex-zbid-opening-arrange-modal ref="modalForm" @ok="reloadArrangeList" />
  </div>
</template>
<script>
import ExZbidOpeningArrangeList from '@/views/exZbidOpeningArrange/ExZbidOpeningArrangeList.vue'
import ExZbidOpeningArrangeModal from '@views/exZbidOpeningArrange/modules/ExZbidOpeningArrangeModal.vue'

import { getAction } from '@api/manage'
export default {
  components: {
    ExZbidOpeningArrangeModal,
    ExZbidOpeningArrangeList,
  },
  data() {
    return {
      projectId: '',
      url: {
        queryById: '/exProject/exProject/queryById',
      },
    }
  },
  created() {
    this.projectId = this.$route.query.projectId
    this.projectName = this.$route.query.projectName
  },
  methods: {
    showApplyModal() {
      this.$refs['modalForm'].add({}, this.projectId)
      //this.$refs['modalForm'].add();
    },
    reloadArrangeList() {
      this.$refs['arrangeListRef'].reloadList()
    },
  },
}
</script>
